<template>
    <div>
        <el-breadcrumb separator="/">
        <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
        <el-breadcrumb-item><router-link :to="url">{{$route.name}}</router-link></el-breadcrumb-item>
        </el-breadcrumb>
    </div>
</template>
<script>
export default{
    data() {
        return {
            url:""
        }
    },
    watch:{
        $route:function(to,from) {
            console.log(this.$route);
            this.url = to.path;
        }
    }
}
</script>